3.14 \(\int \frac{\cos ^2(a+b x^2)}{x^3} \, dx\)

Optimal. Leaf size=57 \[ -\frac{1}{2} b \sin (2 a) \text{CosIntegral}\left (2 b x^2\right )-\frac{1}{2} b \cos (2 a) \text{Si}\left (2 b x^2\right )-\frac{\cos \left (2 \left (a+b x^2\right )\right )}{4 x^2}-\frac{1}{4 x^2} \]

[Out]

-1/(4*x^2) - Cos[2*(a + b*x^2)]/(4*x^2) - (b*CosIntegral[2*b*x^2]*Sin[2*a])/2 - (b*Cos[2*a]*SinIntegral[2*b*x^
2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.11751, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {3404, 3380, 3297, 3303, 3299, 3302} \[ -\frac{1}{2} b \sin (2 a) \text{CosIntegral}\left (2 b x^2\right )-\frac{1}{2} b \cos (2 a) \text{Si}\left (2 b x^2\right )-\frac{\cos \left (2 \left (a+b x^2\right )\right )}{4 x^2}-\frac{1}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^2]^2/x^3,x]

[Out]

-1/(4*x^2) - Cos[2*(a + b*x^2)]/(4*x^2) - (b*CosIntegral[2*b*x^2]*Sin[2*a])/2 - (b*Cos[2*a]*SinIntegral[2*b*x^
2])/2

Rule 3404

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]

Rule 3380

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^2\left (a+b x^2\right )}{x^3} \, dx &=\int \left (\frac{1}{2 x^3}+\frac{\cos \left (2 a+2 b x^2\right )}{2 x^3}\right ) \, dx\\ &=-\frac{1}{4 x^2}+\frac{1}{2} \int \frac{\cos \left (2 a+2 b x^2\right )}{x^3} \, dx\\ &=-\frac{1}{4 x^2}+\frac{1}{4} \operatorname{Subst}\left (\int \frac{\cos (2 a+2 b x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac{1}{4 x^2}-\frac{\cos \left (2 \left (a+b x^2\right )\right )}{4 x^2}-\frac{1}{2} b \operatorname{Subst}\left (\int \frac{\sin (2 a+2 b x)}{x} \, dx,x,x^2\right )\\ &=-\frac{1}{4 x^2}-\frac{\cos \left (2 \left (a+b x^2\right )\right )}{4 x^2}-\frac{1}{2} (b \cos (2 a)) \operatorname{Subst}\left (\int \frac{\sin (2 b x)}{x} \, dx,x,x^2\right )-\frac{1}{2} (b \sin (2 a)) \operatorname{Subst}\left (\int \frac{\cos (2 b x)}{x} \, dx,x,x^2\right )\\ &=-\frac{1}{4 x^2}-\frac{\cos \left (2 \left (a+b x^2\right )\right )}{4 x^2}-\frac{1}{2} b \text{Ci}\left (2 b x^2\right ) \sin (2 a)-\frac{1}{2} b \cos (2 a) \text{Si}\left (2 b x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.127861, size = 50, normalized size = 0.88 \[ -\frac{b x^2 \sin (2 a) \text{CosIntegral}\left (2 b x^2\right )+b x^2 \cos (2 a) \text{Si}\left (2 b x^2\right )+\cos ^2\left (a+b x^2\right )}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^2]^2/x^3,x]

[Out]

-(Cos[a + b*x^2]^2 + b*x^2*CosIntegral[2*b*x^2]*Sin[2*a] + b*x^2*Cos[2*a]*SinIntegral[2*b*x^2])/(2*x^2)

________________________________________________________________________________________

Maple [C]  time = 0.138, size = 89, normalized size = 1.6 \begin{align*} -{\frac{1}{4\,{x}^{2}}}+{\frac{\pi \,{{\rm e}^{-2\,ia}}{\it csgn} \left ( b{x}^{2} \right ) b}{4}}-{\frac{{{\rm e}^{-2\,ia}}{\it Si} \left ( 2\,b{x}^{2} \right ) b}{2}}+{\frac{i}{4}}{{\rm e}^{-2\,ia}}{\it Ei} \left ( 1,-2\,ib{x}^{2} \right ) b-{\frac{i}{4}}{{\rm e}^{2\,ia}}b{\it Ei} \left ( 1,-2\,ib{x}^{2} \right ) -{\frac{\cos \left ( 2\,b{x}^{2}+2\,a \right ) }{4\,{x}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x^2+a)^2/x^3,x)

[Out]

-1/4/x^2+1/4*Pi*exp(-2*I*a)*csgn(b*x^2)*b-1/2*exp(-2*I*a)*Si(2*b*x^2)*b+1/4*I*exp(-2*I*a)*Ei(1,-2*I*b*x^2)*b-1
/4*I*exp(2*I*a)*b*Ei(1,-2*I*b*x^2)-1/4*cos(2*b*x^2+2*a)/x^2

________________________________________________________________________________________

Maxima [C]  time = 1.26632, size = 82, normalized size = 1.44 \begin{align*} -\frac{{\left ({\left (i \, \Gamma \left (-1, 2 i \, b x^{2}\right ) - i \, \Gamma \left (-1, -2 i \, b x^{2}\right )\right )} \cos \left (2 \, a\right ) +{\left (\Gamma \left (-1, 2 i \, b x^{2}\right ) + \Gamma \left (-1, -2 i \, b x^{2}\right )\right )} \sin \left (2 \, a\right )\right )} b x^{2} + 1}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x^3,x, algorithm="maxima")

[Out]

-1/4*(((I*gamma(-1, 2*I*b*x^2) - I*gamma(-1, -2*I*b*x^2))*cos(2*a) + (gamma(-1, 2*I*b*x^2) + gamma(-1, -2*I*b*
x^2))*sin(2*a))*b*x^2 + 1)/x^2

________________________________________________________________________________________

Fricas [A]  time = 1.64515, size = 194, normalized size = 3.4 \begin{align*} -\frac{2 \, b x^{2} \cos \left (2 \, a\right ) \operatorname{Si}\left (2 \, b x^{2}\right ) + 2 \, \cos \left (b x^{2} + a\right )^{2} +{\left (b x^{2} \operatorname{Ci}\left (2 \, b x^{2}\right ) + b x^{2} \operatorname{Ci}\left (-2 \, b x^{2}\right )\right )} \sin \left (2 \, a\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*b*x^2*cos(2*a)*sin_integral(2*b*x^2) + 2*cos(b*x^2 + a)^2 + (b*x^2*cos_integral(2*b*x^2) + b*x^2*cos_i
ntegral(-2*b*x^2))*sin(2*a))/x^2

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{2}{\left (a + b x^{2} \right )}}{x^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x**2+a)**2/x**3,x)

[Out]

Integral(cos(a + b*x**2)**2/x**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.16631, size = 144, normalized size = 2.53 \begin{align*} -\frac{2 \,{\left (b x^{2} + a\right )} b^{2} \operatorname{Ci}\left (2 \, b x^{2}\right ) \sin \left (2 \, a\right ) - 2 \, a b^{2} \operatorname{Ci}\left (2 \, b x^{2}\right ) \sin \left (2 \, a\right ) - 2 \,{\left (b x^{2} + a\right )} b^{2} \cos \left (2 \, a\right ) \operatorname{Si}\left (-2 \, b x^{2}\right ) + 2 \, a b^{2} \cos \left (2 \, a\right ) \operatorname{Si}\left (-2 \, b x^{2}\right ) + b^{2} \cos \left (2 \, b x^{2} + 2 \, a\right ) + b^{2}}{4 \, b^{2} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x^3,x, algorithm="giac")

[Out]

-1/4*(2*(b*x^2 + a)*b^2*cos_integral(2*b*x^2)*sin(2*a) - 2*a*b^2*cos_integral(2*b*x^2)*sin(2*a) - 2*(b*x^2 + a
)*b^2*cos(2*a)*sin_integral(-2*b*x^2) + 2*a*b^2*cos(2*a)*sin_integral(-2*b*x^2) + b^2*cos(2*b*x^2 + 2*a) + b^2
)/(b^2*x^2)